package com.atguigu.educms.controller;

import com.atguigu.commonutils.Result;
import com.atguigu.educms.entity.CrmBanner;
import com.atguigu.educms.service.CrmBannerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 前台管理系统
 * @author 董万均
 * @since 2020-11-01
 */
@RestController
@RequestMapping("/educms/bannerFront")
public class BannerFrontController {
    @Autowired
    private CrmBannerService bannerService;

    @ApiOperation(value = "查询所有轮播图")
    @GetMapping("getAllBanner")
    public Result getAllBanner(){
        List<CrmBanner> list=bannerService.selectAllBanner();
        return Result.ok().data("list",list);
    }
}
